package com.rico.deploy.service.impl;

import com.rico.deploy.entity.SubjectType;
import com.rico.deploy.mapper.SubjectTypeMapper;
import com.rico.deploy.service.SubjectTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 夏智力
 * @FileName SubjectTypeServiceImpl
 * @date 2021/5/14 18:55
 * @Software: IntelliJ IDEA
 */
@Service
public class SubjectTypeServiceImpl implements SubjectTypeService {

    @Autowired
    private SubjectTypeMapper subjectTypeMapper;



    @Override
    public List<SubjectType> selectAll() {
        return subjectTypeMapper.selectAll();
    }

    @Override
    public SubjectType selectById(Integer id) {
        return subjectTypeMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertSubjectType(SubjectType subjectType) {
        return subjectTypeMapper.insert(subjectType);
    }

    @Override
    public int deleteSubjectTypeById(Integer id) {
        return subjectTypeMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateSubjectType(SubjectType subjectType) {
        return subjectTypeMapper.updateByPrimaryKey(subjectType);
    }
}
